<h2>Crear Usuario</h2>
<?php if(validation_errors()): ?><?php echo validation_errors('<p class="message_red">', '</p>'); ?><?php endif; ?>

<?php
echo form_open('login/crear/usuario');

echo form_fieldset('Informaci&oacute;n Personal');

	echo form_label('Nombre', 'first_name');
	$first_name = array(
		'id' => 'first_name',
		'name' => 'first_name',
		'class' => 'input-text'
	);
	echo form_input($first_name);
	
	
	echo form_label('Apellido', 'last_name');
	$first_name = array(
		'id' => 'last_name',
		'name' => 'last_name',
		'class' => 'input-text'
	);
	echo form_input($first_name);
	
	echo form_label('RUT', 'rut');
	$first_name = array(
		'id' => 'rut',
		'name' => 'rut',
		'class' => 'input-text'
	);
	echo form_input($first_name);
	
	echo form_label('Direcci&oacute;n', 'address');
	$first_name = array(
		'id' => 'address',
		'name' => 'address',
		'class' => 'input-text'
	);
	echo form_input($first_name);
	
	echo form_label('Tel&eacute;fono', 'phone');
	$first_name = array(
		'id' => 'phone',
		'name' => 'phone',
		'class' => 'input-text'
	);
	echo form_input($first_name);
	

echo form_fieldset_close();
echo form_fieldset('Informaci&oacute;n de registro');

		echo form_label('Nombre de Usuario', 'username');
		$rut = array(
			'id' => 'username',
			'name' => 'username',
			'maxlength' => '25',
			'class' => 'username input-text'
		);
		echo form_input($rut);
		
		echo form_label('Contrase&ntilde;a', 'password');
		$pass = array(
			'id' => 'password',
			'name' => 'password',
			'maxlength' => '100',
			'class' => 'pass input-text'
		);
		echo form_password($pass);
		
		echo form_label('Confirmaci&oacute;n de contrase&ntilde;a', 'password2');
		$pass2 = array(
			'id' => 'password2',
			'name' => 'password2',
			'maxlength' => '100',
			'class' => 'pass2 input-text'
		);
		
		echo form_password($pass2);
		
		echo form_label('Rol', 'role');
		$options = array(
			'0' => 'Administrador',
			'1' => 'Usuario'
		);
		echo form_dropdown('role', $options, '3');
		echo "<br />";
		
		echo form_label('Direcci&oacute;n de Email', 'email_address');
		$email = array(
			'id' => 'email_address',
			'name' => 'email_address',
			'class' => 'input-text'
		);
		echo form_input($email);
		
		echo form_label('Confirmaci&oacute;n de Email', 'email_address2');
		$email2 = array(
			'id' => 'email_address2',
			'name' => 'email_address2',
			'class' => 'input-text'
		);
		echo form_input($email2);

echo form_fieldset_close();

echo form_submit('crear-usuario', 'Crear Usuario', 'class="blue-pill"');
echo anchor("control", "Cancelar y volver");
?>

<?php
	echo form_close();
?>